from pydantic_settings import BaseSettings
from typing import Optional

class Settings(BaseSettings):
    # 基础配置
    PROJECT_NAME: str = "AI对话智能体"
    VERSION: str = "1.0.0"
    API_V1_STR: str = "/api"
    
    # 安全配置
    SECRET_KEY: str = "your-secret-key-here"  # 在生产环境中应该使用环境变量
    ALGORITHM: str = "HS256"
    ACCESS_TOKEN_EXPIRE_MINUTES: int = 1440  # 24小时
    
    # 数据库配置
    SQLITE_DATABASE_URL: str = "sqlite:///./ai_agent.db"
    
    # LLM配置
    DEFAULT_MODEL: str = "gpt-3.5-turbo"
    OPENAI_API_KEY: Optional[str] = "sk-b7cb6e885efd45029f850733d6d2101f"
    OPENAI_BASE_URL: Optional[str] = "https://dashscope.aliyuncs.com/compatible-mode/v1/"
    
    # 雪花算法配置
    WORKER_ID: int = 1
    DATACENTER_ID: int = 1
    
    class Config:
        case_sensitive = True
        env_file = ".env"

settings = Settings() 